package com.knight.study.patterns.tujie.facade;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * @Author knight
 * @Date 2024/9/11 17:20
 */

public class Database {
    private Database() {

    }
    public static Properties getProperties(String dbname) {
        String filename = dbname + ".txt";
        Properties prop = new Properties();
        try {
            prop.load(new FileInputStream(filename));
        } catch (IOException e) {
            System.out.println("Warning:" + filename + " is not found.");
        }
        return prop;
    }
}
